<?php
/*
 *

性别: 0男  1女

密码加密    pwd+createtime+phone

seseion ：
用户登录信息------------  user = json_encode(array('id','phone','email','createtime','authority','nick'))
后台管理登录信息---------  optLogin= json_encode(array('id','phone','email','createtime','authority','nick'))
用户登录错误次数---------  login-error-num = array('num'=>'次数','time'=>'最后一次错误时间')
点击记录---------------   click= array('点击的页面'=>array('ID号1','ID号2','ID号13'...))
用户登录验证码---------    login-sfx
支付密码错误次数---------   pay-error-num
邮箱验证  ----------       verify-email = array('time','code')
手机验证  ----------       verify-phone = array('time','code','num')

普通用户   网站管理员/系统管理员
1            1/2
user:     普通用户   100000
edit:     网站管理员 110000
admin:    系统管理员 120000
 */
// windows下
$paths = str_replace('\\', '/', dirname(__FILE__));
$paths = explode('/', $paths);
array_pop($paths);
$path = implode('/', $paths);
//网站配置
$website = array(
	'database' => array(
		'db' => array(
			'name' => 'mysql', //数据库类型
			'host' => '127.0.0.1', //数据库地址
			'usr' => 'yiren', //数据库登录名
			'pwd' => 'WD-sql@182075', //数据库密码
			'db' => 'yiren', //数据库表名
			'charset' => 'utf8', //数据库使用的字符集
			'durable' => false, //是否是持久连接 true是 false否(一般都是短连接)
			'cache' => true,
			'prefix' => '', //数据库前缀名
			'debug' => true, //是否开启错误提示 true开启 false关闭
			'sql' => true, //输出是否带sql
			'caching' => false, //是否开启数据缓存 file缓存开启  false关闭
			//缓存控制
			'cache' => array(
				//文件缓存
				'path' => $path . '/data/db', //文件缓存根目录
				'max' => 30000, //文件夹内文件上限
			),
		),
	),
	//权限
	'authority' => array(
		'user' => 100000,
		'edit' => 110000, //后台编辑
		'admin' => 120000, //系统管理员
	),
	//分页配置
	'page' => array(
		'num' => 40, //默认每页显示个数
	),
	//存放类实例
	'class' => array(),
	//URL地址
	'url' => array(
		//网站地址例：http://www.test.com
		'root' => 'http://47.96.31.221',
		'error' => 'http://47.96.31.221', //错误跳转页面
		'up' => 'http://47.96.31.221', //上次访问的URL
		'now' => 'http://47.96.31.221', //当前URL
		'image' => 'http://47.96.31.221', //图片地址
	),

	// html相关
	'html' => array(
		// 伪静态开关
		'rewrite' => true,
	),
	//网站硬盘地址
	'path' => array(
		//网站物理根地址
		'root' => $path,
		//类存放地址
		'lib' => $path . '/lib',
		//网站配置文件地址
		'conf' => $path . '/conf',
		//网站数据地址
		'data' => $path . '/data',

		//数据上传地址
		'upload' => array(
			// 用户图片
			'user' => $path . '/data/upload/user/image',
			// 文章图片
			'image' => $path . '/data/upload/image',
		),

		//临时文件夹
		'temp' => $path . '/data/temp',
		//页面处理web
		'action' => $path . '/action',
		// socket处理
		'socket' => $path . '/action/socket',
		//页面处理非pc端
		'mobile' => $path . '/action',
		//静态文件存放地址
		'css' => $path . '/css',
		'js' => $path . '/js',
		'html' => $path . '/data/html',
	),

	//配置模板类配置
	'template' => array(
		'templateDir' => $path . '/tpl', //模板地址
		'compileDir' => $path . '/data/compile', //模板编译后存放地址
		'left' => '<!--{',
		'right' => '}-->',
		'cache' => false, //是否开启直接读取缓存 ----- 开发时开启，正式运行时关闭
	),
	//安全配置
	'safe' => array(
		//系统管理员账号
		'system' => array(),
		//安全IP
		'ip' => ['127.0.0.1'],
		//安全域名
		'domain' => ['yirenzuji.com'],
		//安全码
		'key' => '1!@asa12@#1yis#*1$JSDSasd~#19',
		// socket识别码
		'socket' => '111',
		//上传文件限制
		'upload' => array(
			'size' => 204800000, //单位B---100M
			'format' => array('jpg', 'gif', 'png'),
		),
		//登录失败次数，超过则需要重启浏览器
		'loginNum' => 10,
		// 脚本启动时间记录
		'time' => microtime(),
	),
	//分类信息
	'tid' => array(
	),
	//临时存放内容
	'temp' => array(),
	// 日志配置
	'log' => array(
		'path' => $path . '/data/log', // 存放根地址
		'size' => 2048000, //日志文件大小bytes
	),
	'pay' => array(
		'ali' => array(
			'key' => 'My9Y8CeJRp6STfbRMGyxLg==',
			'privateKey' => 'MIIEowIBAAKCAQEAkDGwroZqo6/HOcSZ1JPZ6e3XkHnlq3yFnWoaWlPTn/zhnWUC7bRevnvhWF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